<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>SGMI</title>
    </h:head>
    <h:body>
        <h:form>
            <center>
            Cadastro de Seção <br/><br/>
            <h:dataTable value="#{departamentosBean.listarDepartamentos()}" var="dataDepart" border="1">
                <h:column>
                    <f:facet name="header">
                        Centro de custo                        
                    </f:facet>
                    <h:outputText value="#{dataDepart.codDepartamento}"/>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        Descrição                        
                    </f:facet>
                    <h:outputText value="#{dataDepart.descricao}"/>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        Ações                        
                    </f:facet>
                    <h:commandLink value="Cadastrar Seção" action="#{secaoBean.carregarDepartamento(dataDepart)}"/>
                </h:column>
            </h:dataTable>
        </center>
        </h:form>
    </h:body>
</html>

